package com.umeox.watch.moto.settings.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class SettingSQLiteOpenHelper extends SQLiteOpenHelper{
	private static final String FACE_NAME = "Settings.db";

	private static final int FACE_VERSION = 1;

	private static SettingSQLiteOpenHelper mSqlHelper ;

	private SettingSQLiteOpenHelper(Context context) {
		super(context, FACE_NAME, null, FACE_VERSION);
	}
	
	public static SettingSQLiteOpenHelper getInstance(Context context){
		if(null == mSqlHelper){
			synchronized (SettingSQLiteOpenHelper.class) {
				if(null == mSqlHelper){
					mSqlHelper = new SettingSQLiteOpenHelper(context.getApplicationContext());
				}
			}
		}
		return mSqlHelper;
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(SettingDB.SQL_FEATURE);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		
	}
	
	@Override
	public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		super.onDowngrade(db, oldVersion, newVersion);
	}

}
